#ifndef CURSOR_H
#define CURSOR_H

#include <ctime>
#include <cmath>
#include <cstdio>

#include "primitive.h"

#define MOUSE    0
#define PEN      1
#define FINGER   2
#define FIDUCIAL 3

using namespace std;

class Cursor : public Point{
    private:
        int id;
        int type;
        long time;
        int deviceX;
        int deviceY;        
        float press;
        Point scene;        
        int tx;        
        int ty;
        float angle;        

    public:
        Cursor(){};
        Cursor(int id, int type, long time, float x, float y, int deviceX, int deviceY, float press, int tx, int ty, float angle){
            this->id = id; 
            this->type = type; 
            this->time = time; 
            this->x = x; 
            this->y = y; 
            this->deviceX = deviceX;
            this->deviceY = deviceY;
            this->press = press; 
            this->tx = tx; 
            this->ty = ty; 
            this->angle = angle;
        };
        ~Cursor(){};

        void setId(int id){this->id = id;}
        int getId(){return this->id;}
        
        void setType(int type){this->type = type;}
        int getType(){return this->type;}

        void setTime(float time){this->time = time;}
        long getTime(){return this->time;}
                
        void setDeviceX(int deviceX){this->deviceX = deviceX;}
        int getDeviceX(){return this->deviceX;}
        
        void setDeviceY(int deviceY){this->deviceY = deviceY;}
        int getDeviceY(){return this->deviceY;}

        void setPressure(float press){this->press = press;}
        float getPressure(){return this->press;}
                                
        void setTx(int tx){this->tx = tx;}
        int getTx(){return this->tx;}
        
        void setTy(int ty){this->ty = ty;}
        int getTy(){return this->ty;}

        void setAngle(float angle){this->angle = angle;}
        float getAngle(){return this->angle;}
        
        void setScenePoint(Point p){
            this->scene = p;
        }
        void setScenePoint(float x, float y, float z){
            this->scene = Point(x,y,z);
        }
        void setSceneX(float x){
            this->scene.setX(x);
        }
        void setSceneY(float y){
            this->scene.setY(y);
        }
        void setSceneZ(float z){
            this->scene.setZ(z);
        }                
        
        Point &getScenePoint(){
            return this->scene;
        }
        float getSceneX(){
            return this->scene.getX();
        }
        float getSceneY(){
            return this->scene.getY();
        }
        float getSceneZ(){
            return this->scene.getZ();
        }        
        
        Cursor clone(){
            Cursor c(id, type, time, x, y, deviceX, deviceY, press, tx, ty, angle);
            return c;
        }
};

#endif /* CURSOR_H */
